/*
 * @[H]:  Copyright (c) 2021 Phytium Information Technology, Inc. 
 * 
 *  SPDX-License-Identifier: Apache-2.0. 
 * 
 * @Date: 2021-07-13 18:54:14
 * @LastEditTime: 2021-07-15 18:45:34
 * @Description:  Description of file
 * @Modify History: 
 * * * Ver   Who        Date         Changes
 * * ----- ------     --------    --------------------------------------
 */

#include "f_spi.h"
#include "f_spi_hw.h"
#include "parameters.h"

FSpiConfig FSpiConfigTable[FSPI_DEVICE_NUM] =
    {
        {
            .instance_id = 0, /* Id of device*/
            .base_address = FSPI0_BASE,
            .module_frequency = 4000000,        // Module frequency
            .irq_num = FSPI0_IRQ_NUM,           // Irq number
            .tx_fifo_len = 0,                   // Tx fifo max length
            .work_mode = FSPI_POLL_TRANSACTION, // Followed by FSPI_POLL_TRANSACTION,FSPI_INTR_TRANSACTION
            .spi_trans_mode = SPI_MODE_0,       // Followed by SPI_MODE_x
            .n_bytes = 1,                       // Transfer 1 is byte , 2 is half word},
        },
        {
            .instance_id = 1, /* Id of device*/
            .base_address = FSPI1_BASE,
            .module_frequency = 4000000,        // Module frequency
            .irq_num = FSPI1_IRQ_NUM,           // Irq number
            .tx_fifo_len = 0,                   // Tx fifo max length
            .work_mode = FSPI_POLL_TRANSACTION, // Followed by FSPI_POLL_TRANSACTION,FSPI_INTR_TRANSACTION
            .spi_trans_mode = SPI_MODE_0,       // Followed by SPI_MODE_x
            .n_bytes = 1,                       // Transfer 1 is byte , 2 is half word},
        },
};
